package com.pioneer.beans;

import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import org.jdom.Element;
import org.jdom.Document;

/**
 * Title:        Pioneer Metals Application
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:      Pioneer Metals
 * @author Gary Chen
 * @version 1.0
 */

public class JobItem {

	private String itemNum;	
	private String quoteNum;
	private String itemDesc;
	private int qty;
	private double price;
	   
    public JobItem(String quoteNum,	String itemNum, String itemDesc, int qty, double price){		
		this.itemNum = itemNum;
		this.quoteNum = quoteNum;
		this.itemDesc = itemDesc;
		this.qty = qty;		
		this.price = price;
	}
	
	public JobItem(String quoteNum,	String itemNum, String itemDesc, String qtyStr, String priceStr){		
		this.itemNum = itemNum;
		this.quoteNum = quoteNum;
		this.itemDesc = itemDesc;
		this.setQtyString(qtyStr);
		this.setPriceString(priceStr);		
    }	
	
	public String getItemNum(){
		return itemNum;
	}
	
	public String getItemDesc() {
		return itemDesc;
	}
	
	public String getQuoteNum() {
		return quoteNum;
	}
	
	public int getQty() {
		return qty;
	}	
	
	public String getQtyString() {
		return Integer.toString(qty);
	}
	
	public double getPrice() {
		return price;
	}
	
	public String getPriceString() {
		return Double.toString(price);
	}
	
	public void setItemNum(String itemNum){
		this.itemNum = itemNum;
	}
	
	public void setItemDesc(String itemDesc) {
		this.itemDesc = itemDesc;
	}
	
	public void setQuoteNum(String quoteNum) {
		this.quoteNum = quoteNum;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
	
	public void setQtyString(String qtyStr) {
		try {
			this.qty = new Integer(qtyStr).intValue();
		}
		catch (java.lang.NumberFormatException ex) {
			this.qty = 0;
		}
	}
	
	public void setPrice(double price) {
		this.price = price;
	}
	
	public void setPriceString(String priceStr) {
		try {
			this.price = new Double(priceStr).doubleValue();
		}
		catch (java.lang.NumberFormatException ex) {
			this.price = 0;
		}
		
	}

}